library(readr)
library(RColorBrewer)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ purrr 1.0.4
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.2 ✔ tibble 3.3.0
## ✔ lubridate 1.9.4 ✔ tidyr 1.3.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(dplyr)
library(readxl)
library(kableExtra)
##
## Attaching package: 'kableExtra'
##
## The following object is masked from 'package:dplyr':
##
## group_rows
library(ggrepel)
library(ggplot2)
library(ggfortify) # For autoplot function for PCA
library(lme4)
## Loading required package: Matrix
##
## Attaching package: 'Matrix'
##
## The following objects are masked from 'package:tidyr':
##
## expand, pack, unpack
library(emmeans)
## Welcome to emmeans.
## Caution: You lose important information if you filter this package's results.
## See '? untidy'
library(performance)
library(corrplot)
## corrplot 0.95 loaded
library(emmeans)
library(broom.mixed)
## Registered S3 method overwritten by 'future':
## method from
## all.equal.connection parallelly
library(knitr)
library(here)
## here() starts at /Users/leahtreffer/GitHub/OatPea_intercrop
data <- read.csv('data/Intermediate/B4I_2025_multi_location_data.csv')
plot_data <- read.csv('data/Intermediate/B4I_2025_multi_location_plotdata.csv')
subplot_data <- read.csv('data/Intermediate/B4I_2025_multi_location_subplotdata.csv')
custom_colors <- c(
"IL" = "#35B7AD",
"ND" = "#1F28A2",
"IA" = "#9D9ED4",
"AL" = "#AE6C13",
"NY" = "#7D0112"
)
Establishment
Height
Maturity
Lodging